<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition 
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:panelGrid columns="7" cellpadding="0" cellspacing="5" style="width: 100%;">
        <h:outputLabel value="#{bundle.cif}"/><h:outputLabel value=":" />  
        <p:inputText value="#{searchCustomer.cif}" style="width: 100px" >
                        <f:ajax event="blur" />
        </p:inputText>
        <h:outputLabel value="#{bundle.globalName}"/><h:outputLabel value=":" />  
        <p:inputText value="#{searchCustomer.nama}" style="width: 270px" >
                        <f:ajax event="blur" />
        </p:inputText>
        <p:commandButton icon="ui-icon-search" iconPos="center" styleClass="btnSmall" process="@this" 
                                     actionListener="#{searchCustomer.loadData()}"
                                     update="#{lookupCustComponenId}savcustTable" />
    </h:panelGrid>

    <p:dataTable id="#{lookupCustComponenId}savcustTable" var="cust" value="#{searchCustomer.lazyModel}"
                        selection="#{searchCustomer.selectedData}" selectionMode="single" rowKey="#{cust.customerId}"
                        resizableColumns="true" rowIndexVar="noUrut" 
                        paginator="true" rows="10" paginatorPosition="bottom" paginatorTemplate="{CurrentPageReport}  {PreviousPageLink} {PageLinks} {NextPageLink}" >
                <p:ajax event="rowSelect" listener="#{searchCustomer.onrowselect}"/>  
                <p:column style="width: 90px" >
                    <f:facet name="header">#{bundle.cif}</f:facet>
                    <h:outputText value="#{cust.cif}" />
                </p:column>
                <p:column style="width: 200px" >
                    <f:facet name="header">#{bundle.globalName}</f:facet>
                    <h:outputText value="#{cust.customerName}" />
                </p:column>
                <p:column style="width: 300px" >
                    <f:facet name="header">#{bundle.adress}</f:facet>
                    <h:outputText value="#{cust.idAddressLine1}" />
                </p:column>
    </p:dataTable>      
</ui:composition>   

